package com.spboot.app.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.jntoo.db.DB;
import java.io.Serializable;
import java.util.*;

@TableName("shangpinxinxi")
public class Shangpinxinxi implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.AUTO)
    private Integer id;

    private String shangpinbianhao;

    private String shangpinmingcheng;

    private Integer shangpinfenlei;

    private String shangpintupian;

    private String shangpinfujian;

    private Double jiage;

    private String shangpinmiaoshu;

    private Integer xiaoliang;

    private String zhuangtai;

    private String faburen;

    private String addtime;
    private String issh;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Long getGouwucheCount() {
        return DB.name("gouwuche").where("shangpinxinxiid", id).count();
    }

    public Long getShangpinshenheCount() {
        return DB.name("shangpinshenhe").where("shangpinxinxiid", id).count();
    }

    public String getShangpinbianhao() {
        return shangpinbianhao;
    }

    public void setShangpinbianhao(String shangpinbianhao) {
        this.shangpinbianhao = shangpinbianhao == null ? "" : shangpinbianhao.trim();
    }

    public String getShangpinmingcheng() {
        return shangpinmingcheng;
    }

    public void setShangpinmingcheng(String shangpinmingcheng) {
        this.shangpinmingcheng = shangpinmingcheng == null ? "" : shangpinmingcheng.trim();
    }

    public Integer getShangpinfenlei() {
        return shangpinfenlei;
    }

    public void setShangpinfenlei(Integer shangpinfenlei) {
        this.shangpinfenlei = shangpinfenlei == null ? 0 : shangpinfenlei;
    }

    public String getShangpintupian() {
        return shangpintupian;
    }

    public void setShangpintupian(String shangpintupian) {
        this.shangpintupian = shangpintupian == null ? "" : shangpintupian.trim();
    }

    public String getShangpinfujian() {
        return shangpinfujian;
    }

    public void setShangpinfujian(String shangpinfujian) {
        this.shangpinfujian = shangpinfujian == null ? "" : shangpinfujian.trim();
    }

    public Double getJiage() {
        return jiage;
    }

    public void setJiage(Double jiage) {
        this.jiage = jiage == null ? 0.0f : jiage;
    }

    public String getShangpinmiaoshu() {
        return shangpinmiaoshu;
    }

    public void setShangpinmiaoshu(String shangpinmiaoshu) {
        this.shangpinmiaoshu = shangpinmiaoshu == null ? "" : shangpinmiaoshu.trim();
    }

    public Integer getXiaoliang() {
        return xiaoliang;
    }

    public void setXiaoliang(Integer xiaoliang) {
        this.xiaoliang = xiaoliang == null ? 0 : xiaoliang;
    }

    public String getZhuangtai() {
        return zhuangtai;
    }

    public void setZhuangtai(String zhuangtai) {
        this.zhuangtai = zhuangtai == null ? "" : zhuangtai.trim();
    }

    public String getFaburen() {
        return faburen;
    }

    public void setFaburen(String faburen) {
        this.faburen = faburen == null ? "" : faburen.trim();
    }

    public String getAddtime() {
        return addtime;
    }

    public void setAddtime(String addtime) {
        this.addtime = addtime == null ? "" : addtime.trim();
    }

    public String getIssh() {
        return issh;
    }

    public void setIssh(String issh) {
        this.issh = issh == null ? "" : issh.trim();
    }
}
